using System.Diagnostics.Contracts;
using System.Security.Principal;

namespace OpenWaves.ActivityFeed.Web
{
    [DefaultImplementation(typeof(HttpContextBasedUserIdentityProvider))]
    [ContractClass(typeof(UserIdentityProviderContract))]
    public interface IUserIdentityProvider
    {
        IIdentity Identity { get; }
    }

    [ContractClassFor(typeof(IUserIdentityProvider))]
    abstract class UserIdentityProviderContract : IUserIdentityProvider
    {
        public IIdentity Identity
        {
            get
            {
                Contract.Ensures(Contract.Result<IIdentity>() != null);
                throw new System.NotImplementedException();
            }
        }
    }
}